package package1;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Date;

public class CreateCMD {
	public static void main(String[] args) throws IOException {
		File f = new File(getDesktop()+"\\autoSign.bat");
		if(f.exists())f.delete();
		String url = "http://10.10.10.46:8080/sse-spm/sys/biz/workload/uajax/doSign.html?comments=&_="+(new Date().getTime() + "");
		url = "www.baidu.com";
		String cmd = "start "+ url;
		BufferedWriter bw;
		bw = new BufferedWriter(new FileWriter(f));
		bw.write(cmd);
		bw.close();
	}
	private static String getDesktop() {
//		return System.getenv("USERPROFILE") + "\\desktop";
		return "c:\\users\\user\\desktop";
	}
}
